src/daemon/ot-daemon.c \
$(NULL)
-ostreed_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(srcdir)/src/daemon -DLOCALEDIR=\"$(datadir)/locale\" $(OT_DEP_GIO_UNIX_CFLAGS)
-ostreed_LDADD = libotutil.la libostree.la $(OT_DEP_GIO_UNIX_LIBS)
+ostreed_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(srcdir)/src/daemon -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+ostreed_LDADD = libotutil.la libostree.la $(OT_INTERNAL_GIO_UNIX_LIBS)
$(NULL)
endif
-libostree_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_DEP_GIO_UNIX_CFLAGS)
+libostree_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
libostree_la_LDFLAGS = -avoid-version -Bsymbolic-functions
-libostree_la_LIBADD = libotutil.la $(OT_DEP_GIO_UNIX_LIBS)
+libostree_la_LIBADD = libotutil.la $(OT_INTERNAL_GIO_UNIX_LIBS)
if USE_LIBARCHIVE
libostree_la_CFLAGS += $(OT_DEP_LIBARCHIVE_CFLAGS)
src/ostadmin/ot-admin-main.c \
$(NULL)
-ostadmin_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(srcdir)/src/ostadmin -DLOCALEDIR=\"$(datadir)/locale\" $(OT_DEP_GIO_UNIX_CFLAGS)
-ostadmin_LDADD = libotutil.la libostree.la $(OT_DEP_GIO_UNIX_LIBS)
+ostadmin_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(srcdir)/src/ostadmin -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+ostadmin_LDADD = libotutil.la libostree.la $(OT_INTERNAL_GIO_UNIX_LIBS)
ostree_bin_shared_cflags = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -I$(srcdir)/src/libostree -I$(srcdir)/src/ostree -DLOCALEDIR=\"$(datadir)/locale\"
ostree_bin_shared_ldadd = libotutil.la libostree.la
-ostree_CFLAGS = $(ostree_bin_shared_cflags) $(OT_DEP_GIO_UNIX_CFLAGS)
-ostree_LDADD = $(ostree_bin_shared_ldadd) $(OT_DEP_GIO_UNIX_LIBS)
+ostree_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+ostree_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS)
if USE_LIBSOUP_GNOME
bin_PROGRAMS += ostree-pull
src/libotutil/otutil.c \
src/libotutil/otutil.h \
$(NULL)
-libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_DEP_GIO_UNIX_CFLAGS)
-libotutil_la_LIBADD = $(OT_DEP_GIO_UNIX_LIBS)
+libotutil_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+libotutil_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS)
bin_PROGRAMS += ostree-run-triggers
ostree_run_triggers_SOURCES = src/triggers/ostree-run-triggers.c
-ostree_run_triggers_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS)
-ostree_run_triggers_LDFLAGS = $(OT_DEP_GIO_UNIX_LIBS)
+ostree_run_triggers_CFLAGS = $(OT_INTERNAL_GIO_UNIX_CFLAGS)
+ostree_run_triggers_LDFLAGS = $(OT_INTERNAL_GIO_UNIX_LIBS)
-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_28 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_28
AM_CFLAGS = $(WARN_CFLAGS)
+if BUILD_EMBEDDED_GLIB
+SUBDIRS = embedded-dependencies .
+else
+SUBDIRS = .
+endif
+
NULL =
BUILT_SOURCES =
MANPAGES =
privlibdir = $(pkglibdir)
privlib_LTLIBRARIES =
+if BUILD_EMBEDDED_GLIB
+OT_INTERNAL_GIO_UNIX_CFLAGS = \
+ -I$(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/include/glib-2.0 \
+ -I$(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/include/gio-unix-2.0 \
+ -I$(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/glib-2.0/include \
+ $(NULL)
+OT_INTERNAL_GIO_UNIX_LIBS = \
+ $(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/libglib-2.0.so \
+ $(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/libgthread-2.0.so \
+ $(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/libgmodule-2.0.so \
+ $(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/libgobject-2.0.so \
+ $(top_builddir)/embedded-dependencies/install-glib/EMBEDGLIB/lib/libgio-2.0.so \
+ $(NULL)
+else
+OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS)
+OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS)
+endif
+
include Makefile-daemon.am
include Makefile-otutil.am
include Makefile-libostree.am
release-tag:
git tag -m "Release $(VERSION)" v$(VERSION)
+
+release-tarball-embedded:
+ git archive --format=tar --prefix=ostree-embeddeps-$(VERSION)/ HEAD > ostree-embeddeps-$(VERSION).tar.tmp
+ tar --append --exclude='.git/*' --transform='s,^embedded-dependencies/,ostree-embeddeps-$(VERSION)/embedded-dependencies/,' --file=ostree-embeddeps-$(VERSION).tar.tmp embedded-dependencies/glib
+ mv ostree-embeddeps-$(VERSION).tar{.tmp,}
+ gzip -f ostree-embeddeps-$(VERSION).tar
PKG_PROG_PKG_CONFIG
-GIO_DEPENDENCY="gio-unix-2.0 >= 2.28"
+AC_ARG_ENABLE(embedded-glib,
+ AS_HELP_STRING([--enable-embedded-glib], [Use embedded GLib copy]),,
+ enable_embedded_glib=no)
+AM_CONDITIONAL(BUILD_EMBEDDED_GLIB, test x$enable_embedded_glib = xyes)
+if test x$enable_embedded_glib = xyes; then
+ echo "NOTICE: Embedded glib enabled"
+else
+ GIO_DEPENDENCY="gio-unix-2.0 >= 2.28"
+ PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY)
+fi
SOUP_DEPENDENCY="libsoup-2.4 >= 2.39.1"
LIBARCHIVE_DEPENDENCY="libarchive >= 2.8.0"
-PKG_CHECK_MODULES(OT_DEP_GIO_UNIX, $GIO_DEPENDENCY)
-
AC_ARG_ENABLE(documentation,
AC_HELP_STRING([--enable-documentation],
[build documentation]),,
fi
AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
-
AC_ARG_WITH(soup-gnome,
AS_HELP_STRING([--without-soup-gnome], [Do not use libsoup-gnome (implies no pull support)]),
:, with_soup_gnome=maybe)
AC_CONFIG_FILES([
Makefile
+embedded-dependencies/Makefile
])
AC_OUTPUT
===============
+ embedded GLib: $enable_embedded_glib
libsoup (retrieve remote HTTP repositories): $with_soup_gnome
libarchive (parse tar files directly): $with_libarchive
"
--- /dev/null
+# Import GLib into local tree
+#
+# Copyright (C) 2012 Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+build-glib/gio/libgio-2.0.la:
+ mkdir -p build-glib
+ (srcdir=$$(cd $(srcdir) && pwd); \
+ cd build-glib; \
+ $${srcdir}/glib/autogen.sh --prefix=/EMBEDGLIB --disable-introspection --disable-man --disable-gtk-doc && \
+ $(MAKE))
+
+install-glib/EMBEDGLIB/include/glib-2.0/glib.h: build-glib/gio/libgio-2.0.la
+ (top_srcdir=$$(cd $(top_srcdir) && pwd); \
+ builddir=$$(pwd); \
+ cd build-glib && \
+ rm -rf install-glib && \
+ $(MAKE) install DESTDIR=$${builddir}/install-glib)
+
+all-local: install-glib/EMBEDGLIB/include/glib-2.0/glib.h
+
+install-exec-local:
+ echo `pwd`
+ $(MKDIR_P) $(DESTDIR)/$(pkglibdir)
+ install install-glib/EMBEDGLIB/lib/*.so.* $(DESTDIR)/$(pkglibdir)
+
--- /dev/null
+embedded-glib-download:
+ test -d glib || git clone --depth=1 git://git.gnome.org/glib -b glib-2-32 glib
--- /dev/null
+To support building on older systems, this infrastructure allows
+bundling libraries. At the moment, this is just GLib.
+
+The intent of this system is that a "ostree-embeddeps.tar.gz" is
+created, which can be used as input to an RPM or Debian package, which
+can then be installed on older operating systems.
+
+To create one, use:
+
+$ cd embedded-dependencies
+$ make -f Makefile.bootstrap embedded-glib-download
+$ cd ..
+$ make release-tarball-embedded
+
+To build it:
+
+$ ./configure --enable-embedded-glib ...
+
+as usual.